﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.RenameTool.CUiRenameToolCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Resources;
using System.Windows;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.RenameTool;

public class CUiRenameToolCmd : TxButtonCommand
{
  private const string RESOURCE_TABLE_PATH = "DnProcessSimulateCommands.StringTable";
  private CApRenameToolEnabler _enabler;

  public CUiRenameToolCmd() => this._enabler = new CApRenameToolEnabler();

  public virtual string Category
  {
    get => this.GetResourceManger().GetString("RENAME_OBJECTS_TOOL_CATEGORY");
  }

  public virtual void Execute(object cmdParams) => ((Window) new CUiRenameToolWindow()).Show();

  private ResourceManager GetResourceManger()
  {
    return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly);
  }

  public virtual string Name => this.GetResourceManger().GetString("RENAME_OBJECTS_TOOL_NAME");

  public virtual string Tooltip
  {
    get => this.GetResourceManger().GetString("RENAME_OBJECTS_TOOL_TOOLTIP");
  }

  public virtual void Disconnect()
  {
    if (this._enabler != null)
      this._enabler.UnregisterFromEvents();
    base.Disconnect();
  }

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this._enabler;

  public virtual bool Licensed => true;

  public virtual string Description
  {
    get => this.GetResourceManger().GetString("RENAME_OBJECTS_TOOL_DESCRIPTION");
  }

  public virtual ITxImage Image => (ITxImage) TxImageManager.GetImageByKey("RenameObjects");
}
